package com.smh.springboottest;

import com.smh.springboottest.anno.EnableCommonConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;


@SpringBootApplication
@MapperScan("com.smh.springboottest.mapper")
//@Import()这里是通过配置类的字节码文件,注册bean,也可以写成数组{,,},但是这样不够优雅,可以使用importselector
//@Import(TestImportSelector.class)
@EnableCommonConfig//自定义注解
public class SpringbootTestApplication {
	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(SpringbootTestApplication.class, args);
//		Object country = context.getBean("country");
		Object province = context.getBean("province");
		System.out.println(province);
//		System.out.println(country);
	}
}
